#include <reg52.h>

typedef unsigned int u16;
typedef unsigned char u8;

void delay(unsigned int i)
{
	while(i--);
}

void uart_init(u8 baud)
{
	TMOD |= 0X20;
	SCON = 0X50;
	PCON = 0X80;
	TH1 = baud;
	TL1 = baud;
	ES = 1;
	EA = 1;
	TR1 = 1;
}
void main()
{
	uart_init(0XFA);
	while(1)
	{
		
	}
}

void uart() interrupt 4
{
	u8 rec_data = 0;
	RI = 0;
	rec_data = SBUF;
	SBUF = rec_data;
	while(!TI);
	TI = 0;
	
}